<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>周期账单新增</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="css/comm.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.picker.min.css" />
    <link rel="stylesheet" type="text/css" href="../script/mui/mui.reset.css" />
    <link rel="stylesheet" type="text/css" href="../script/vant/index.css" />
    <link rel="stylesheet" type="text/css" href="css/form.css" />
    <link rel="stylesheet" type="text/css" href="css/editStyle.css" />
    <style type="text/css">
        .aui-list .aui-list-item-label-icon {
            padding-right: 0;
        }

        .aui-list .aui-list-item-input label {
            margin-right: 10px;
        }

        .aui-btn-primary {
            background: #01B2F5;
            width: 95%;
            left: 2.5%;
            bottom: 0.5rem;
            border-radius: 5px;
        }

        .aui_formcontent {
            text-align: right;
        }

        .aui_formcontent.contentmain{
            width: 100%;;
            text-align: left;
        }
        .contentmainitem{
            border: solid 1px #f0f0f0;
            background: #f5f5f5;
            font-size: 0.7rem;
            padding: 10px 15px;
            margin-top: 10px;
            margin-bottom: 15px;
            border-radius: 10px;
            position: relative;
        }
        .selecteditempng{
            width: 34px;
            position: absolute;
            right: 0px;
            top:0px;
        }
        .selecteditempng img{
            width: 100%;
            height: auto;
        }
        .contentmainitem_name{
            font-weight: bold;
            line-height:24px;
        }
        .contentmainitem_box{
            width: 100%;
            margin-top: 5px;
        }
        .contentmainitem_box_line{
            width: 100%;
            line-height: 20px;
            margin-bottom: 5px;
            
            color: #999;
            display:inline-flex;
            justify-content: space-between;
        }
        .contentmainitem_box_line_lft{
            width: 60%;
        }
        .contentmainitem_box_line_rgt{
            color: #000;
        }

        .mask_bg {
            position: fixed;
            z-index: 9999;
            background: rgba(0, 0, 0, 0.3);
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
        }

        .choose_box {
            position: fixed;
            z-index: 10000;
            background: #fff;
            top: 10%;
            bottom: 10%;
            left: 5%;
            right: 5%;
            border-radius: 5px;
        }

        .choose_box .close_btn {
            position: absolute;
            top: 10px;
            right: 20px;
            z-index: 10002;
        }

        .choose_box .close_btn .iconfont {
            font-size: 1rem;
            color: #888;
        }

        .choose_room_title {
            position: relative;
            text-align: center;
            line-height: 2.4rem;
            font-size: 0.8rem;
            border-bottom: solid 0.5px #eee;
        }

        .choose_room_content {
            margin: 28px 8px 20px 8px;
            position: absolute;
            top: 2rem;
            bottom: 20px;
            left: 20px;
            right: 20px;
            overflow: scroll;
            z-index: 10001;
        }

        .choose_room_item {
            position: relative;
            padding-left: 20px;
            padding-bottom: 20px;
        }

        .choose_room_item input[type='radio'] {
            position: absolute;
            top: 7px;
            left: 0;
        }

        .choose_room_item label {
            line-height: 1.5rem;
            padding-left: 10px;
            font-size: 0.75rem;
        }
        .popup-title{
            padding: 20px 20px 10px 20px;
            text-align: center;
            border-bottom: solid 1px #f0f0f0;
            font-weight: 600;
        }
        .boxmsg{
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.65rem;
    color: #999;
    text-align: left;
    padding: 7px;
    margin-bottom: 20px;
}
.aui_formcontent textarea,.aui_formcontent input{
    font-size: 0.75rem;
}
.tishi{
    padding: 17px;
    font-size: 0.65rem;
    color: rgb(255, 102, 0);
    text-align: left;
    margin-bottom: 10px;
}
.max_formtitle{
    min-width: 6rem;
}
.selecteditem{
    border:solid 1px #01B2F5;
}

    </style>
</head>

<body>
    <div id="app" v-cloak>
        <van-popup v-model="showTime" position="bottom" :style="{ height: '40%' }">
            <van-datetime-picker
            v-model="defaultTime"
            type="year-month"
            :min-date="minDate"
            @confirm="sureTime"
            @cancel="closeTime"
            />
        </van-popup>
        <div class="mask_bg" v-on:click="doCloseMask()" v-if="IsMaskOpen"></div>
        <div class="choose_box" v-if="IsChooseRoom">
            <span class="close_btn" v-on:click="doCloseMask()">
                <i class="icon iconfont icon-guanbi"></i>
            </span>
            <div class="choose_room_title">选择关联房间
            </div>
            <div class="choose_room_content">
                <div v-on:click="doSelectRoom(item)" class="choose_room_item" v-for="item in roomList">
                    <input v-bind:checked="item.isSelected" type="radio" class="aui-radio" />
                    <label>{{item.name}}</label>
                </div>
            </div>
        </div>
        <div class="boxarea edit">
            <div class="">
                <div class="aui_formitem">
                    <div class="aui_formtitle">资源位置<img class="col-star" src="../image/redstar.png"></div>
                    <div class="aui_formcontent" style="padding-left: 0px; display: flex;" v-on:click="do_choose_room()">
                          <van-field v-model="form.fullName" rows="1" autosize readonly type="textarea"  input-align="right" right-icon="arrow-down" />
                    </div>
                </div>
                <div class="aui_formitem" style="display: block;">
                    <div class="aui_formtitle">账单生成方式</div>
                    <div class="aui_formcontent" style="margin-top: 10px; margin-bottom: 10px; padding-left: 0px;">
                        <van-radio-group v-model="radio" direction="horizontal">
                            <van-radio name="2">指定月底</van-radio>
                            <van-radio name="1">一个缴费周期的账单</van-radio>
                        </van-radio-group>
                    </div>
                </div>
                <div class="aui_formitem" v-if="radio==2">
                    <div class="aui_formtitle max_formtitle">计费结束日期<img class="col-star" src="../image/redstar.png"></div>
                    <div class="aui_formcontent" style="padding-left: 0px;">
                        <span v-on:click="do_select_time()"  class="choose new-span-input"
                            v-bind:class="{'textColorPlaceholder':form.feeDate==''}">
                            {{form.feeDate==''?'请选择':form.feeDate}}
                        </span>
                    </div>
                </div>
                <div class="aui_formitem block" style="border-bottom: none;">
                    <div class="aui_formtitle">收费标准选择</div>
                    <div class="aui_formcontent contentmain" style="padding-left: 0px;">
                        <div class="contentmainitem" v-on:click="do_chooseitem(item)" v-bind:class="item.isSelect?'selecteditem':''" v-for="item in form.feeTypeList">
                            <div v-if="item.isSelect" class="selecteditempng"><img class="" src="../image/isroomselects.png"></div>
                            <div class="contentmainitem_name">{{item.name}}</div>
                            <div class="contentmainitem_box">
                                <div class="contentmainitem_box_line">
                                    <div class="contentmainitem_box_line_lft">下次计费开始日期：</div>
                                    <div class="contentmainitem_box_line_rgt">{{item.nextTime}}</div>
                                </div>
                                <div class="contentmainitem_box_line">
                                    <div class="contentmainitem_box_line_lft">单价：</div>
                                    <div class="contentmainitem_box_line_rgt">{{item.price}}</div>
                                </div>
                                <div class="contentmainitem_box_line">
                                    <div class="contentmainitem_box_line_lft">缴费周期:</div>
                                    <div class="contentmainitem_box_line_rgt">{{item.feeRound}}</div>
                                </div>
                            </div>
                        </div>
                    
                    </div>
                </div>
                
            </div>
        </div>
        <div class="bottom">
            <div v-if="!submiting" class="aui_bottombtn" v-on:click="do_save()">生成</div>
            <div v-if="submiting" class="aui_bottombtn">生成中...</div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript " src="../script/vant/vue.js"></script>
<script type="text/javascript " src="../script/vant/vant.js"></script>
<script type="text/javascript " src="../script/moment/moment.js"></script>
<script type="text/javascript " src="js/chargeroomfee_addRound.js"></script>

</html>